{% extends 'base.html' %}
{% load staticfiles %}

{% block custom_css %} 
<style>
    .errorlist {
        color: red;
    }
</style>
{% endblock custom_css %}

{% block main %} 
<div class="ui modal" style="width: 650px;">
    <div class="header">
      修改密码
    </div>
    <div class="ui text container" style="margin: 20px; width: 80%;">
        <form method="post" action="{% url 'password_change' %}" id='pass_charge'>
            {% csrf_token %}
            <div class="ui form">
                {{ form.non_field_errors }}
                {% for field in form %}
                    {{ field.label_tag }}
                    {{ field }}
                    {{ field.errors }}
                    {% if field.help_text %}
                        <p class="help text-small text-muted">{{ field.help_text|safe }}</p>
                    {% endif %}
                {% endfor %}
            </div>
            <div class="ui right aligned container" style="padding: 10px;">
<!--                 <button class="ui fluid large teal submit button" id="submit" type="submit">
                  确认修改
                </button> -->
                <button class="ui button" type="button" onclick="javascript:history.back();">
                返回
                </button>
                <button class="ui teal submit button" id="submit" type="submit">
                提交
                </button>
            </div>
        </form>
    </div>
</div>
{% endblock main %}

{% block custom_script %} 
<script type="text/javascript">
    $('.ui.modal')
        .modal({
          blurring: true
        })
        .modal('show')
    ;
</script>
{% endblock custom_script %}
